home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
TRUEG.TAS
< prev
next >
Wrap
Text File
|
1992-03-15
|
3KB
|
96 lines
{ Written by Jim Camenos, May 31, 1991, Prodigy code VNGH10A
This program attempts to determine the True Trading Range over the past
3 months. It then calculates the standard deviation of the range and
calculates the number and percentage the True Trading Range occurred
within 1 standard deviation, 2 standard deviations, 3 standard deviations
and over. The higher % in 1 standard deviation, eg, 90%++, indicates
the underlying equity to be non-volitable. Higher percentages in 2,3 or
over 3 standard deviations are more volitable issues. Stocks trading high
% in their 1 std deviation will be trading options with lower premium than
those with lower percentages. Interesting that AMGN average True Trading
Range for the past 3 months is $5 and has traded 87% within its 1 std
deviation and 9% within 2 std deviations. The std deviation is $3, theref
ore
AMGN would have a trading range between $2-$8 daily and 9% or 1 out of eve
ry
11 trading days the range would be in a $12 range. Check the TAS referanc
e
manual for the definition of True Trading Range.
}
{ Modified 3/15/92 adds graphics, analyizes volatility, and ma crossovers}
#max_quotes 200
#OUTPUT_FILE 'TRUEG.LST'
adr : array;
adr = ad();
ada : array;
adb : array;
ada = mov(adr,5,'e');
adb = mov(adr,13,'e');
adn : array;
adn = sub(ada,adb);
m8 : array;
m8 = mov(v,21,'e');
m13 : array;
m13 = mov(v,34,'e');
m813 : array;
m813 = sub(m8,m13);
c5 : array;
c5 = mov(c,13,'e');
c35 : array;
c35 = mov(c,35,'e');
tdy = tr();
tx: array;
tx=TR();
x := quote_count-1; { load max(66,num of quotes in file) MM 6/5}
avg_tr = sum(tx,x)/x;
sd = std(tx,x);
gosub true_range;
if first_ticker then
begin
writeln('Read your charts before making any investment decisions\n\n');
writeln
(' Trading 1 STD 1 STD() 2 3 STD')
;
writeln
(' Range Dev Days 0/0 STD STD');
end;
star = ' '
if tdy>avg_tr then
star='*'
writeln(ticker,' ',fullname,avg_tr,' ',sd,int(sd1),' ',int((sd1/x)*100),'%',
int((sd2/x)*100),'%',int((sd3/x)*100),'%',tdy,star); {int((sd4/x)*100),'%');
}
if tdy>avg_tr {or tdy>tx[-1]} then
gosub graphit;
return;
:graphit
begin
OPENGRAPH(4);
sizegraph(6,2,2,2);
GRAPH(1,'Avg Trng Rrge: '+format(avg_tr,'%4.2f')+' Tdy Rnge: '
+format(tdy,'%4.2f')+
' Prev: '+format(c[-1],'%7.3f')+
' Tdy: '+format(c[0],'%7.3f')+
' DTR: '+format(tdy,'%5.2f'),c5,c35);
GRAPH(v,'Volume');
graph(m813,'Volume Oscillator - Over "0" Line: Volume 13 Weeks > 34 Weeks');
graph(adn,'Accumulation/Distribution Oscillator');
CLOSEGRAPH();
end;
:true_range
begin
a = 1;
sd1 = 0;
sd2 = 0;
sd3 = 0;
sd4 = 0;
:true_r
if a > x then return;
if (avg_tr-sd) <= tx[a] and ((avg_tr+sd)>=tx[a]) then sd1 = sd1+1 else
if (avg_tr-(sd*2))<=tx[a] and ((avg_tr+(sd*2))>=tx[a]) then sd2=sd2+1 else
if (avg_tr-(sd*3))<=tx[a] and ((avg_tr+(sd*3))>=tx[a]) then sd3=sd3+1 else
sd4 = sd4+1;
a = a+1;
goto true_r;
end;